package org.autocode.util;

import java.util.Collection;

/**
 * @program: autocode
 * @description:
 * @author: zhu.xiaojie
 * @create: 2020-08-16 10:28
 */
public class ObjectUtils {

    public static boolean isEmpty(Object obj){
        if(obj == null){
            return true;
        }
        if(obj instanceof CharSequence){
            if("".equals(obj)){
                return true;
            }
        }
        if(obj instanceof Collection){
            if(((Collection) obj).size() == 0){
                return true;
            }
        }

        return false;
    }
}
